$(function () {

    var check_login = function () {
        $.post('../../action/sys.php?act=check_login', function (res) {
            console.log(res);
            if (typeof(res.status) !== 'undefined' && res.status !== 0) {
                window.location.href = res.data;
            }
        }, 'json');
    }
    check_login();
});